<template>
  <div>
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="(item, index) in getSwiper" :key="index">
        <img :src="item.picUrl" alt="" class="img" />
      </van-swipe-item>
    </van-swipe>
  </div>
</template>
<script>
export default {
  data() {
    return {
      getSwiper: [],
    };
  },
  mounted() {
    this.$API.getSwiper().then((res) => {
      this.getSwiper = res.data.data;
    });
  },
};
</script>
<style lang="scss">
.my-swipe .van-swipe-item {
  width: 100%;
  height: 45vh;
  color: #fff;
  font-size: 20px;
  line-height: 150px;
  text-align: center;
}
.my-swipe .van-swipe-item .img {
  width: 100%;
  height: 100%;
}
</style>